# 排序
from django_filters.rest_framework import DjangoFilterBackend
import django_filters

from ec.models import Users


class UsersFilter(django_filters.FilterSet):
    username = django_filters.CharFilter(lookup_expr='icontains')
    email = django_filters.CharFilter(lookup_expr='icontains')

    class Meta:
        model = Users
        fields = ['username', 'email']
